home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / X11R4 / cmds / X / ddx / Xsun / patches / sunInit.c.patch < prev    next >
Encoding:
Text File  |  1991-11-05  |  4.7 KB  |  182 lines

  1. *** /tmp/,RCSt1659767    Mon Nov  4 17:41:20 1991
  2. --- sunInit.c    Tue Jan  8 23:00:54 1991
  3. ***************
  4. *** 48,53 ****
  5. --- 48,54 ----
  6.   #endif
  7.   
  8.   #include    "sun.h"
  9. + #include    <signal.h>
  10.   #include    <servermd.h>
  11.   #include    "dixstruct.h"
  12.   #include    "dix.h"
  13. ***************
  14. *** 54,68 ****
  15.   #include    "opaque.h"
  16.   #include    "mipointer.h"
  17.   
  18.   extern int sunMouseProc();
  19.   extern int sunKbdProc();
  20.   extern Bool sunBW2Probe(), sunBW2Create();
  21.   extern Bool sunCG2CProbe(), sunCG2CCreate();
  22.   extern Bool sunCG3CProbe(), sunCG3CCreate();
  23.   extern Bool sunCG4CProbe(), sunCG4CCreate();
  24. - #ifdef FBTYPE_SUNFAST_COLOR /* doesn't exist in sunos3.x */
  25.   extern Bool sunCG6CProbe(), sunCG6CCreate();
  26. - #endif
  27.   extern void ProcessInputEvents();
  28.   
  29.   extern void SetInputCheck();
  30. --- 55,77 ----
  31.   #include    "opaque.h"
  32.   #include    "mipointer.h"
  33.   
  34. + #define    R_OK    4
  35. + #define    W_OK    2
  36. + #define    X_OK    1
  37. + #define    F_OK    0
  38. + #include "sys/ioctl.h"
  39. + #include "fcntl.h"
  40.   extern int sunMouseProc();
  41.   extern int sunKbdProc();
  42.   extern Bool sunBW2Probe(), sunBW2Create();
  43. + #ifndef    sprite
  44.   extern Bool sunCG2CProbe(), sunCG2CCreate();
  45. + #endif    sprite
  46.   extern Bool sunCG3CProbe(), sunCG3CCreate();
  47.   extern Bool sunCG4CProbe(), sunCG4CCreate();
  48.   extern Bool sunCG6CProbe(), sunCG6CCreate();
  49.   extern void ProcessInputEvents();
  50.   
  51.   extern void SetInputCheck();
  52. ***************
  53. *** 72,78 ****
  54.   #define    XDEVICE    "XDEVICE"
  55.   #define    PARENT    "WINDOW_GFX"
  56.   
  57. ! int sunSigIO = 0;     /* For use with SetInputCheck */
  58.   static int autoRepeatHandlersInstalled;    /* FALSE each time InitOutput called */
  59.   
  60.   static Bool sunDevsProbed = FALSE;
  61. --- 81,87 ----
  62.   #define    XDEVICE    "XDEVICE"
  63.   #define    PARENT    "WINDOW_GFX"
  64.   
  65. ! int spriteCheckInput = 0;     /* For use with SetInputCheck */
  66.   static int autoRepeatHandlersInstalled;    /* FALSE each time InitOutput called */
  67.   
  68.   static Bool sunDevsProbed = FALSE;
  69. ***************
  70. *** 79,115 ****
  71.   Bool sunSupportsDepth8 = FALSE;
  72.   unsigned long sunGeneration = 0;
  73.   
  74. - /*-
  75. -  *-----------------------------------------------------------------------
  76. -  * SigIOHandler --
  77. -  *    Signal handler for SIGIO - input is available.
  78. -  *
  79. -  * Results:
  80. -  *    sunSigIO is set - ProcessInputEvents() will be called soon.
  81. -  *
  82. -  * Side Effects:
  83. -  *    None
  84. -  *
  85. -  *-----------------------------------------------------------------------
  86. -  */
  87. - /*ARGSUSED*/
  88. - static void
  89. - SigIOHandler(sig, code, scp)
  90. -     int        code;
  91. -     int        sig;
  92. -     struct sigcontext *scp;
  93. - {
  94. -     sunSigIO = 1;
  95. - }
  96.   sunFbDataRec sunFbData[] = {
  97.       sunBW2Probe,      "/dev/bwtwo0",        sunBW2Create,
  98.       sunCG2CProbe,      "/dev/cgtwo0",        sunCG2CCreate,
  99.       sunCG3CProbe,      "/dev/cgthree0",    sunCG3CCreate,
  100. - #ifdef FBTYPE_SUNFAST_COLOR
  101.       sunCG6CProbe,    "/dev/cgsix0",        sunCG6CCreate,
  102. - #endif
  103.       sunCG4CProbe,      "/dev/cgfour0",        sunCG4CCreate,
  104.       sunBW2Probe,      "/dev/bwtwo0",        sunBW2Create,
  105.   };
  106. --- 88,100 ----
  107.   Bool sunSupportsDepth8 = FALSE;
  108.   unsigned long sunGeneration = 0;
  109.   
  110.   sunFbDataRec sunFbData[] = {
  111.       sunBW2Probe,      "/dev/bwtwo0",        sunBW2Create,
  112. + #ifndef    sprite
  113.       sunCG2CProbe,      "/dev/cgtwo0",        sunCG2CCreate,
  114. + #endif    sprite
  115.       sunCG3CProbe,      "/dev/cgthree0",    sunCG3CCreate,
  116.       sunCG6CProbe,    "/dev/cgsix0",        sunCG6CCreate,
  117.       sunCG4CProbe,      "/dev/cgfour0",        sunCG4CCreate,
  118.       sunBW2Probe,      "/dev/bwtwo0",        sunBW2Create,
  119.   };
  120. ***************
  121. *** 149,157 ****
  122. --- 134,144 ----
  123.   {
  124.       register int i;
  125.   
  126. + #ifndef    sprite
  127.       i = fcntl(2, F_GETFL, 0);
  128.       if (i >= 0)
  129.       (void) fcntl(2, F_SETFL, i & ~FNDELAY);
  130. + #endif    sprite
  131.   }
  132.   
  133.   /*-
  134. ***************
  135. *** 187,192 ****
  136. --- 174,180 ----
  137.       else if (!strcmp(argv[i],"-mono"))
  138.           devStart = 0;
  139.       }
  140. + #ifndef    sprite
  141.       /*
  142.        *    Writes to /dev/console can block - causing an
  143.        *    excess of error messages to hang the server in
  144. ***************
  145. *** 206,211 ****
  146. --- 194,200 ----
  147.           ErrorF("InitOutput: can't put stderr in non-block mode\n");
  148.       }
  149.       }
  150. + #endif    sprite
  151.       pScreenInfo->imageByteOrder = IMAGE_BYTE_ORDER;
  152.       pScreenInfo->bitmapScanlineUnit = BITMAP_SCANLINE_UNIT;
  153.       pScreenInfo->bitmapScanlinePad = BITMAP_SCANLINE_PAD;
  154. ***************
  155. *** 272,280 ****
  156.       RegisterPointerDevice(p);
  157.       RegisterKeyboardDevice(k);
  158.       miRegisterPointerDevice(screenInfo.screens[0], p);
  159. !     signal(SIGIO, SigIOHandler);
  160.   
  161. !     SetInputCheck (&zero, &sunSigIO);
  162.   }
  163.   
  164.   /*-
  165. --- 261,272 ----
  166.       RegisterPointerDevice(p);
  167.       RegisterKeyboardDevice(k);
  168.       miRegisterPointerDevice(screenInfo.screens[0], p);
  169. !     spriteCheckInput = 0;
  170. !     SetInputCheck (&zero, &spriteCheckInput);
  171.   
  172. !     screenInfo.screens[0]->blockData =
  173. !     screenInfo.screens[0]->wakeupData = (pointer)k;
  174.   }
  175.   
  176.   /*-
  177.